<!DOCTYPE html>
<html>
<head>
    <title>万家管理员登录</title>
    {{template "inc/mate.html" .}}
    {{template "inc/easyui_css.html" .}}
    {{template "inc/ie_supper.html" .}}
</head>
<body>
    <div id="dlg" class="easyui-dialog" title="万家管理员登录" data-options="closable:false,closed: false,draggable:false,resizable:false,modal:true" style="width:400px;padding:50px 60px; ">
        <form id="ff" method="post" action="{{.baseUrl}}" class="easyui-form" data-options="novalidate:true,ajax:false">
            <div style="margin-bottom:20px">
                <input class="easyui-textbox" prompt="用户名" name="phone_number" data-options="required:true,validType:'unamevali',missingMessage:'用户名不可以为空',invalidMessage:'用户名必须是5位及以上字母数字符组成'" iconWidth="28" style="width:100%;height:34px;padding:10px;" />
            </div>
            <div style="margin-bottom:20px">
                <input class="easyui-passwordbox" prompt="密码" data-options="required:true,validType:'length[6,12]',missingMessage:'密码不可以为空',invalidMessage:'密码必须6到12位'" name="pwd" iconWidth="28" style="width:100%;height:34px;padding:10px" />
            </div>
            {{if .result}}
                {{if eq .result "false"}}
                    <div style="text-align:center;color: #ff0000; padding:0px 0px 15px 0px; font-weight: bold;">{{.msg}}</div>
                {{else}}
                    {{.result}}
                {{end}}
            {{end}}
            <div style="text-align:center;padding:5px 0;">
                <a href="javascript:void(0)" class="easyui-linkbutton" id="btn_submit" style="width:80px; border-color: #4cae4c; background-image: linear-gradient(rgb(76,174,76) 0px, rgb(68,157,68) 100%);">登录</a>
                <a href="javascript:void(0)" class="easyui-linkbutton" id="btn_clear" style="width:80px;">消除</a>
            </div>
        </form>
    </div>
</body>
</html>
{{template "inc/easyui_js.html" .}}
<script type="text/javascript" src="{{.staticResourceUrl}}/js/easyui_validate.js"></script>
<script type="text/javascript" charset="UTF-8">
    $(document).ready(function(){
        $("#dlg").dialog("open");
        $("#btn_submit").click(function(){
            $('#ff').form('submit',{
                onSubmit:function(){
                    return $(this).form('enableValidation').form('validate');
                }
            });
        });
        $("#btn_clear").click(function(){
            $("#ff").form({
                novalidate:true
            });
            $("#ff").form("clear");
        });
    });
</script>